import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;

import java.util.Map;

/**
 * @FileName: EventListener
 * @Author Steven
 * @Date: 2021/4/6
 */
public class EventListener extends AnalysisEventListener<User>{

    /**
     * 从第二行开始一行一行读取
     * @param user 实体类
     * @param analysisContext 内容
     */
    @Override
    public void invoke(User user, AnalysisContext analysisContext) {
        System.out.println(user);
    }


    /**
     * 读取第一行
     * @param headMap
     * @param context
     */
    @Override
    public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {
        System.out.println("头信息"+headMap);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }

}
